Integrand size = 14, antiderivative size = 109 \[ \int (c+d x) \cot ^3(a+b x) \, dx=-\frac {d x}{2 b}+\frac {i (c+d x)^2}{2 d}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3801, 3554, 8, 3798, 2221, 2317, 2438} \[ \int (c+d x) \cot ^3(a+b x) \, dx=\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {d x}{2 b}+\frac {i (c+d x)^2}{2 d} \]
[In]
[Out]
Rule 8
Rule 2221
Rule 2317
Rule 2438
Rule 3554
Rule 3798
Rule 3801
Rubi steps \begin{align*} \text {integral}& = -\frac {(c+d x) \cot ^2(a+b x)}{2 b}+\frac {d \int \cot ^2(a+b x) \, dx}{2 b}-\int (c+d x) \cot (a+b x) \, dx \\ & = \frac {i (c+d x)^2}{2 d}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}+2 i \int \frac {e^{2 i (a+b x)} (c+d x)}{1-e^{2 i (a+b x)}} \, dx-\frac {d \int 1 \, dx}{2 b} \\ & = -\frac {d x}{2 b}+\frac {i (c+d x)^2}{2 d}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}+\frac {d \int \log \left (1-e^{2 i (a+b x)}\right ) \, dx}{b} \\ & = -\frac {d x}{2 b}+\frac {i (c+d x)^2}{2 d}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2} \\ & = -\frac {d x}{2 b}+\frac {i (c+d x)^2}{2 d}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(240\) vs. \(2(109)=218\).
Time = 6.25 (sec) , antiderivative size = 240, normalized size of antiderivative = 2.20 \[ \int (c+d x) \cot ^3(a+b x) \, dx=-\frac {1}{2} d x^2 \cot (a)-\frac {d x \csc ^2(a+b x)}{2 b}-\frac {c \left (\cot ^2(a+b x)+2 \log (\cos (a+b x))+2 \log (\tan (a+b x))\right )}{2 b}+\frac {d \csc (a) \csc (a+b x) \sin (b x)}{2 b^2}+\frac {d \csc (a) \sec (a) \left (b^2 e^{i \arctan (\tan (a))} x^2+\frac {\left (i b x (-\pi +2 \arctan (\tan (a)))-\pi \log \left (1+e^{-2 i b x}\right )-2 (b x+\arctan (\tan (a))) \log \left (1-e^{2 i (b x+\arctan (\tan (a)))}\right )+\pi \log (\cos (b x))+2 \arctan (\tan (a)) \log (\sin (b x+\arctan (\tan (a))))+i \operatorname {PolyLog}\left (2,e^{2 i (b x+\arctan (\tan (a)))}\right )\right ) \tan (a)}{\sqrt {1+\tan ^2(a)}}\right )}{2 b^2 \sqrt {\sec ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 280 vs. \(2 (93 ) = 186\).
Time = 0.84 (sec) , antiderivative size = 281, normalized size of antiderivative = 2.58
method | result | size |
risch | \(\frac {i d \,x^{2}}{2}+\frac {i d \,a^{2}}{b^{2}}+\frac {2 b d x \,{\mathrm e}^{2 i \left (x b +a \right )}-i d \,{\mathrm e}^{2 i \left (x b +a \right )}+2 b c \,{\mathrm e}^{2 i \left (x b +a \right )}+i d}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2}}-\frac {c \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{b}+\frac {2 c \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {c \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b}+\frac {2 i d x a}{b}-i c x +\frac {i d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b}-\frac {d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a}{b^{2}}+\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{b}-\frac {2 d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{2}}\) | \(281\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 339 vs. \(2 (90) = 180\).
Time = 0.26 (sec) , antiderivative size = 339, normalized size of antiderivative = 3.11 \[ \int (c+d x) \cot ^3(a+b x) \, dx=\frac {4 \, b d x + 4 \, b c + {\left (i \, d \cos \left (2 \, b x + 2 \, a\right ) - i \, d\right )} {\rm Li}_2\left (\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right )\right ) + {\left (-i \, d \cos \left (2 \, b x + 2 \, a\right ) + i \, d\right )} {\rm Li}_2\left (\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right )\right ) + 2 \, {\left (b c - a d - {\left (b c - a d\right )} \cos \left (2 \, b x + 2 \, a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, b x + 2 \, a\right ) + \frac {1}{2} i \, \sin \left (2 \, b x + 2 \, a\right ) + \frac {1}{2}\right ) + 2 \, {\left (b c - a d - {\left (b c - a d\right )} \cos \left (2 \, b x + 2 \, a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, b x + 2 \, a\right ) - \frac {1}{2} i \, \sin \left (2 \, b x + 2 \, a\right ) + \frac {1}{2}\right ) + 2 \, {\left (b d x + a d - {\left (b d x + a d\right )} \cos \left (2 \, b x + 2 \, a\right )\right )} \log \left (-\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b d x + a d - {\left (b d x + a d\right )} \cos \left (2 \, b x + 2 \, a\right )\right )} \log \left (-\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, d \sin \left (2 \, b x + 2 \, a\right )}{4 \, {\left (b^{2} \cos \left (2 \, b x + 2 \, a\right ) - b^{2}\right )}} \]
[In]
[Out]
\[ \int (c+d x) \cot ^3(a+b x) \, dx=\int \left (c + d x\right ) \cot ^{3}{\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 830 vs. \(2 (90) = 180\).
Time = 0.38 (sec) , antiderivative size = 830, normalized size of antiderivative = 7.61 \[ \int (c+d x) \cot ^3(a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x) \cot ^3(a+b x) \, dx=\int { {\left (d x + c\right )} \cot \left (b x + a\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x) \cot ^3(a+b x) \, dx=\int {\mathrm {cot}\left (a+b\,x\right )}^3\,\left (c+d\,x\right ) \,d x \]
[In]
[Out]